﻿namespace NMortgage.UI.ViewModels
{
    using System.Collections.ObjectModel;

    using Caliburn.Micro;

    using NMortgage.UI.Events;
    using NMortgage.UI.Model;

    public sealed class FeeListViewModel : ABaseItemListViewModel<FeeCollection,Fee>
    {
        #region Constructors

        public FeeListViewModel(IEventAggregator eventAggregator)
            : base (eventAggregator)
        {
            ItemCollection = new FeeCollection();
        }

        #endregion Constructors

        #region Properties

        public override string Title
        {
            get
            {
                return Properties.Resources.FeeListViewTitle;
            }
        }

        #endregion Properties

        #region Methods

        public override void Add()
        {
            ItemDialog = new FeeViewModel(EventAggregator);
        }

        public override void Edit(Fee fee)
        {
            ItemDialog = new FeeViewModel(EventAggregator, fee);
        }
        #endregion Methods
    }
}